import {createStore} from 'vuex'

export default createStore({
    state: {
        token: ''
    },
    mutations: {
        set_token(state, token) {
            state.token = token
            sessionStorage.token = token
            console.log('我被vuex调用存放token:' + sessionStorage.getItem('token'))
        }, del_token(state) {
            state.token = ''
            sessionStorage.removeItem('token')
        }
    },
    actions: {
    }
})
